<!-- BEGIN: BLOCK -->
<script src="{const_Web_Url}js/jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript" src="{const_Web_Url}js/ui.core.js"></script>
<script type="text/javascript" src="{const_Web_Url}js/ui.datepicker.js"></script>
<script type="text/javascript">
function reload_security_image(){	
	jQuery('#reload_button').attr({src : "{const_Web_Url}themes/{theme}/images/indicator_refresh.gif"});
	jQuery("#security_image").attr({ src : '{const_Web_Url}security_image.php' + '?' + (new Date()).getTime() });		
	setTimeout(function(){jQuery('#reload_button').attr({src : "{const_Web_Url}themes/{theme}/images/refresh.gif"}); }, 500);
}

$().ready(function() {
	$('label.required').append('&nbsp;<font color="red">*</font>&nbsp;');
	$("#frmBookTour").validate({
		rules: {
			name: {
				required: true
			},
			email: {
				required: true,
				email: true
			},
			numberguest: {
				required: true,
				digits: true
			},
			numberroom: {
				required: true,
				digits: true
			},
			securitycode: {
				required: true,
				remote: "{const_Web_Url}check.php?check=securitycode"
			}
		},
		messages: {
			name: {
				required: "{Required} {Fullname}"
			},
			email: {
				required: "{Required} Email",
				email: "Email {Invalid}"
			},
			numberguest: {
				required: "{Required} {NumberGuest}",
				digits: "{IsNumberic}"
			},
			numberroom: {
				required: "{Required} {NumberRoom}",
				digits: "{IsNumberic}"
			},
			securitycode: {
				required: "{Required} {SecurityCode}",
				remote: "{SecurityCode} {Invalid}"
			}
		},
		success: function(label) {
			label.html("&nbsp;").addClass("checked");
		},
		submitHandler: function() {
			var frm = document.frmBookTour;	
			frm.target = "fr_submit";
			frm.submit();
		}
	});
});

$(function() {
	$("#startdate").datepicker();
});

</script>
<link rel="stylesheet" type="text/css" href="{const_Web_Url}themes/{theme}/css/{theme_tab}/ui.core.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{const_Web_Url}themes/{theme}/css/{theme_tab}/ui.datepicker.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{const_Web_Url}themes/{theme}/css/{theme_tab}/ui.theme.css" media="screen" />
<h1 class="tour_name">{lbl}</h1>
<div class="content_line"></div><br />
<div class="content">
		<div>{contact_info}<br /></div>
		<form class="frmBookTour" id="frmBookTour" name="frmBookTour" method="post" action="{const_Web_Url}booktour.php">
		<input type="hidden" name="send" value="yes" />
		<input type="hidden" name="tourid" value="{tour_id}" />
		<div id="err" style="display:none">
			<div id="str_error"></div>
			<iframe name="fr_submit" width="0" height="0" style="visibility:hidden"></iframe>
		</div>
		<!-- BEGIN: SENT -->
		<div class="str_error">{Alert}<br /><br /></div>
		<!-- END: SENT -->
		<p><h2 class="tour_name">{CustomerInfo}</h2></p>
		<p>
			<label for="name" class="required">{Fullname}</label>
			<input name="name" type="text" id="name" size="30" maxlength="100">
		</p>
		<p>
			<label for="email" class="required">Email</label>
			<input name="email" type="text" id="email" size="30" maxlength="100">
		</p>
		<p>
			<label for="phone">{Phone}</label>
			<input name="phone" type="text" id="phone" size="20" maxlength="30">
		</p>
		<p>
			<label for="fax">{Fax}</label>
			<input name="fax" type="text" id="fax" size="20" maxlength="30">
		</p>
		<p>
			<label for="contactdetail">{ContactDetail}</label>
			<textarea name="contactdetail" cols="30" rows="6" id="contactdetail">{contactdetail}</textarea>
		</p>
		<p><h2 class="tour_name">{TourInfo}</h2></p>
		<p>
			<label for="tour">{TourName}</label>
			<input name="tour" type="text" id="tour" value="{tour}" size="40" maxlength="100" readonly="">
		</p>
		<p>
			<label for="startdate">{StartDate}</label>
			<input name="startdate" type="text" id="startdate" value="{startdate}" size="20" maxlength="30">
		</p>
		<p>
			<label for="numberguest" class="required">{NumberGuest}</label>
			<input name="numberguest" type="text" id="numberguest" value="{numberguest}" size="20" maxlength="30">
		</p>
		<p>
			<label for="numberroom" class="required">{NumberRoom}</label>
			<input name="numberroom" type="text" id="numberroom" value="{numberroom}" size="20" maxlength="30">
		</p>
		<p>
			<label for="additonal">{Additonal}</label>
			<textarea name="additonal" cols="30" rows="6" id="additonal">{additonal}</textarea>
		</p>
		<p>
			<label for="address" class="required">{SecurityCode}</label>
			<img src="{const_Web_Url}security_image.php" id="security_image" name="security_image" align="absmiddle" /> 
			<img id="reload_button" onclick="reload_security_image()" src="{const_Web_Url}themes/{theme}/images/refresh.gif" />
			<input id="securitycode" name="securitycode" size="6" maxlength="6" />
		</p>
		<p style="padding-left:140px;">
			<input class="button" type="button" value="{Back}" onclick="javascript:history.go(-1);"/>
			<input class="button" type="submit" value="{Send}"/>	
		</p>
		</form>

</div>	
<!-- END: BLOCK -->